<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title></title>
    <#include "/header.html">
    <script src="${request.contextPath}/statics/libs/ajaxupload.js"></script>
    <link rel="stylesheet" href="${request.contextPath}/statics/css/bootstrap-table.min.css">
    <link rel="stylesheet" href="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.css">
    <script src="${request.contextPath}/statics/libs/bootstrap-table.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.min.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.bootstrap3.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/jquery.treegrid.extension.js"></script>
    <script src="${request.contextPath}/statics/plugins/treegrid/tree.table.js"></script>

</head>
<body>
<div id="rrapp" v-cloak>
    <div class="row">
        <div class="col-md-2">
            <div id="schoolTree" class="ztree">

            </div>
        </div>
        <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
            <div class="modal-dialog" role="document">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">修改</h4>
                    </div>
                    <div class="modal-body">
                        <form class="form-horizontal">
                            <div class="form-group">
                                <div class="col-sm-4 control-label">学校名称</div>
                                <div class="col-sm-8 control-label">
                                    <div>{{school.id}}{{school.name}}</div>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 control-label">专业代码</div>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" v-model="profession.code" placeholder="专业代码"/>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-4 control-label">专业名称</div>
                                <div class="col-sm-8">
                                    <input type="text" class="form-control" v-model="profession.name" placeholder="专业名称"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 control-label">专业类型</div>
                                <div class="col-sm-8">
                                    <select v-model="profession.type" class="form-control">
                                        <option  v-for="item in types" :value="item">{{item}}</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-4 control-label">文理科</div>
                                <div class="col-sm-8">
                                    <select v-model="profession.wenlike" class="form-control">
                                        <option  v-for="item in wenlike" :value="item">{{item}}</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-4 control-label">本专科</div>
                                <div class="col-sm-8">
                                    <select v-model="profession.level" class="form-control">
                                        <option  v-for="item in level" :value="item">{{item}}</option>
                                    </select>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                        <button type="button" class="btn btn-primary" data-dismiss="modal" @click="getInfoUpdata">确定</button>
                    </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->
        <div class="col-md-5">
            <div v-show="showList">
                <div class="grid-btn">

                    <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                    <!-- <a class="btn btn-primary" id="mallProfession"><i class="fa fa-plus"></i>&nbsp;专业批量上传</a>-->

                    <!--
                                <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>


                                <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>-->

                </div>



                <div style="text-align: center">{{school.name}}</div>
                <table id="jqGrid"></table>
                <div id="jqGridPager"></div>
            </div>
            <div v-show="!showList" class="panel panel-default">
                <div class="panel-heading">{{title}}</div>
                <form class="form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-4 control-label">学校名称</div>
                        <div class="col-sm-8 control-label">
                            <div>{{school.id}}{{school.name}}</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 control-label">专业代码</div>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" v-model="profession.code" placeholder="专业代码"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-4 control-label">专业名称</div>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" v-model="profession.name" placeholder="专业名称"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 control-label">专业类型</div>
                        <div class="col-sm-8">
                            <select v-model="profession.type" class="form-control">
                                <option  v-for="item in types" :value="item">{{item}}</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-4 control-label">文理科</div>
                        <div class="col-sm-8">
                            <select v-model="profession.wenlike" class="form-control">
                                <option  v-for="item in wenlike" :value="item">{{item}}</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 control-label">本专科</div>
                        <div class="col-sm-8">
                            <select v-model="profession.level" class="form-control">
                                <option  v-for="item in level" :value="item">{{item}}</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-2 control-label"></div>
                        <input type="button" class="btn btn-primary" @click="saveOrUpdate" @click="update" value="确定"/>
                        &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
                    </div>

                </form>
            </div>
        </div>
        <div class="col-md-5">
            <a class="btn btn-primary" @click="addPYearScore"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <div v-show="showYearList">
                <div class="panel panel-default form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-3 control-label">学校名称</div>
                        <div class="col-sm-9 control-label">
                            <div>{{school.id}}{{school.name}}</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-3 control-label">专业代码</div>
                        <div class="col-sm-9 control-label">
                            <div>{{profession.code}}</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-3 control-label">专业名称</div>
                        <div class="col-sm-9 control-label">
                            <div>{{profession.name}}</div>
                        </div>
                    </div>


                </div>

                <table id="jqGridProfessional" style="margin-top: 30px"></table>
            </div>
            <div v-show="!showYearList">
                <div class="panel panel-default form-horizontal">
                    <div class="form-group">
                        <div class="col-sm-3 control-label">学校名称</div>
                        <div class="col-sm-9 control-label">
                            <div>{{school.id}}{{school.name}}</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-3 control-label">专业代码</div>
                        <div class="col-sm-9 control-label">
                            <div>{{profession.code}}</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-3 control-label">专业名称</div>
                        <div class="col-sm-9 control-label">
                            <div>{{profession.name}}</div>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-4 control-label">年份</div>
                        <div class="col-sm-8">
                            <select v-model="professionLowScore.year" class="form-control">
                                <option  v-for="item in noHasSchoolYear" :value="item">{{item}}</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-4 control-label">文科</div>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" v-model="professionLowScore.wenkeScore" v-bind:readonly="profession.wenlike=='理科'"     placeholder="最低分"/>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-4 control-label">理科</div>
                        <div class="col-sm-8">
                            <input type="text" class="form-control" v-model="professionLowScore.likeScore"  v-bind:readonly="profession.wenlike=='文科'"   placeholder="最低分"/>
                        </div>
                    </div>



                    <div class="form-group">
                        <div class="col-sm-2 control-label"></div>
                        <input type="button" class="btn btn-primary" @click="saveYear" value="确定"/>
                        &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reloadYear" value="返回"/>
                    </div>

                </div>
            </div>

        </div>

    </div>

</div>

</div>
</body>
<script src="${request.contextPath}/statics/js/modules/school/schoolProfession.js?_${.now?long}"></script>
</html>